<?php

/**
 * Bbsucursal form.
 *
 * @package    ingenyo-biblio
 * @subpackage form
 * @author     Your name here
 */
class SelectBibliotecaForm  extends sfForm
{

  public function configure()
  {

    $this->setWidget('select', new sfWidgetFormPropelChoice(array(
        'model' => 'Bbsucursal'
      )));
    
    $this->setValidator('select', new sfValidatorPropelChoice(array(
        'model' => 'Bbsucursal'
      )));

    $this->getWidget('select')->setLabel(false);
    $this->getWidget('select')->setAttribute('style', 'width: 180px;');
//    $this->getWidget('select')->setOption('renderer_class', 'mbWidgetFormChosenChoice');
    $this->getWidget('select')->setDefault(sfContext::getInstance()->getUser()->getGuardUser()->getBiblioteca()->getId());

  }

}
